Traditional computer systems include byte-addressable volatile memory (e.g., dynamic random access memory, or DRAM) and block-addressable nonvolatile storage devices such as solid state disks (SSDs) and magnetic disks. A typical program reads data from nonvolatile storage, stores and modifies the data in volatile memory, and then writes the modified data back to nonvolatile storage using block-based commands.
Persistent memory is an emerging technology that offers fast, byte-level access to data in a manner similar to DRAM, but is nonvolatile in nature. Thus, with persistent memory, software applications can access and modify individual bytes of data in-place using regular memory load and store instructions, and at the same time be assured that the data will be preserved in the memory and can continue to be accessed after, e.g., an AC (alternating current) power failure or other event that causes the system motherboard to lose or cycle AC power (e.g., a cold or hot reboot).
There are a number of implementations of persistent memory that are based on new physical memory types, such as phase-change memory (PCM) and magnetoresistive RAM. There is also an approach that implements persistent memory by combining DRAM, a battery, and nonvolatile memory (e.g., flash memory) on a custom dual-inline memory module (known as a non-volatile DIMM, or NVDIMM). With this approach, the system BIOS presents the DRAM on the NVDIMM as persistent memory to the computer system's operating system (OS) or hypervisor. This memory is not “true” persistent memory in the sense that the DRAM itself is still volatile. However, when an AC power loss event occurs, a specialized controller on the NVDIMM automatically saves the contents of the DRAM to the local flash memory while the NVDIMM is powered via the battery. Then, when AC power is restored and the system is powered on again, the controller reads the saved data from the flash memory back into the NVDIMM DRAM, thereby restoring the persistent memory for use by applications.
While NVDIMMs are a practical alternative to more exotic persistent memory designs, NVDIMMs are still quite expensive; for example, a NVDIMM module may cost twice as much as a regular DRAM module of similar density/capacity. Accordingly, it would be desirable to have techniques for implementing persistent memory that can leverage the existing components in current computer systems, without requiring custom hardware.